﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace LdtJudge.DataEngine.Model.Dudection
{
    /// <summary>
    /// 对接推导服务接口时的输入参数类
    /// </summary>
    public class DeduceInputModel
    {
        ///// <summary>
        ///// 案件ID
        ///// </summary>
        //public string CaseID { get; set; }
        ///// <summary>
        ///// 案件唯一ID
        ///// </summary>
        //public string OutRelatID { get; set; }
        ///// <summary>
        ///// 案件类型
        ///// </summary>
        //public string CaseType { get; set; }
        ///// <summary>
        ///// 案由ID
        ///// </summary>
        //public string CaseCauseID { get; set; }
        ///// <summary>
        ///// CaseElementXml
        ///// </summary>
        //public string CaseElementXml { get; set; }
        ///// <summary>
        ///// CauseElementXml
        ///// </summary>
        //public string CauseElementXml { get; set; }

        /// <summary>
        /// 规则代码
        /// </summary>
        [JsonProperty(PropertyName = "code")]
        public string code { get; set; }

        /// <summary>
        /// 访问程序
        /// </summary>
        public string project { get; set; }
        /// <summary>
        /// 参数列表
        /// </summary>
        public List<OutParameterItem> outParameter { get; set; }
        /// <summary>
        /// 运行规则文档
        /// </summary>
        public List<RuleListItem> ruleList { get; set; }
    }

    /// <summary>
    /// 参数
    /// </summary>
    public class OutParameterItem
    {
        /// <summary>
        /// 参数名称
        /// </summary>
        [JsonProperty(PropertyName = "code")]
        public string code { get; set; }
        /// <summary>
        /// 参数类型
        /// </summary>
        [JsonProperty(PropertyName = "type")]
        public string Type { get; set; }
        /// <summary>
        /// 参数值
        /// </summary>
        [JsonProperty(PropertyName = "value")]
        public string Value { get; set; }
    }

    /// <summary>
    /// 运行规则文档
    /// </summary>
    public class RuleListItem
    {
        /// <summary>
        /// 规则名称
        /// </summary>
        [JsonProperty(PropertyName = "code")]
        public string Code { get; set; }
        /// <summary>
        /// 规则文档路径
        /// </summary>
        [JsonProperty(PropertyName = "path")]
        public string Path { get; set; }
        /// <summary>
        /// 类型 案件或是案由
        /// </summary>
        [JsonProperty(PropertyName = "type")]
        public string Type { get; set; }
    }
}
